from PyQt6.QtWidgets import QMainWindow, QLineEdit, QApplication, QFileDialog, QTableWidget, QTableWidgetItem, QMessageBox


def copy_widget_content_to_clipboard(widget: QLineEdit):
    """复制控件文本到剪贴板"""
    clipboard = QApplication.clipboard()
    clipboard.setText(widget.text())


